package com.mm.cme.kotlin_001.level03_object_oriented_program.singleton


/**
 * Descriptions：在kotlin中object表示单例
 * <p>
 * Author：ChenME
 * Date：2017/7/17
 * Email：ibelieve1210@163.com
 */

class Driver

interface OnExternalDriverMountListener {

    fun onMount(driver: Driver)

    fun onUnmount(driver: Driver)
}

abstract class Player

object MusicPlayer : Player(), OnExternalDriverMountListener {
    override fun onMount(driver: Driver) {
    }

    override fun onUnmount(driver: Driver) {
    }

    val state: Int = 0
    fun paly(url: String) {}
    fun stop() {}
}